﻿using System;
using UnityEngine;

namespace RootMotion.Demos
{
	// Token: 0x020000E4 RID: 228
	public class UserControlAI : UserControlThirdPerson
	{
		// Token: 0x06000690 RID: 1680 RVA: 0x0003B334 File Offset: 0x00039534
		public override void Update()
		{
			float d = (!this.walkByDefault) ? 1f : 0.5f;
			Vector3 vector = this.moveTarget.position - base.transform.position;
			vector.y = 0f;
			float num = (!(this.state.move != Vector3.zero)) ? (this.stoppingDistance * this.stoppingThreshold) : this.stoppingDistance;
			this.state.move = ((vector.magnitude <= num) ? Vector3.zero : (vector.normalized * d));
		}

		// Token: 0x0400060A RID: 1546
		public Transform moveTarget;

		// Token: 0x0400060B RID: 1547
		public float stoppingDistance = 0.5f;

		// Token: 0x0400060C RID: 1548
		public float stoppingThreshold = 1.5f;
	}
}
